Using the UDF in an FBD circuit program or another UDF

After configuring a UDF library from Tools -> Options: UDF for the current project, the UDF appears in the block tree. You can then use the UDFs in a circuit program as any other function block.

Note

Not all UDFs can be used in a circuit program. Invalid UDFs appear in the block tree, but are gray. A UDF is invalid if it meets one or more of these conditions:

  • The UDF has no blocks or connectors

  • The UDF has input or output connectors, but no block connections

  • The UDF contains blocks, but no in or out connectors

A circuit program can have at most 16 different UDFs, and no more than 64 total UDF instances.

Within a circuit program, interaction with UDFs is consistent to other function blocks. Double-clicking, for example, produces the Parameter dialog. With this dialog, you can set user-defined names and comments as other function blocks.

Similarly, UDF parameters can be referenced by other blocks, for example:

Editable UDF parameters can be included in message texts, which is shown as follows:

Note

You can not invert the input connectors of a UDF.

If a UDF internally references a parameter that is provided by another already-programmed function block, this parameter will appear as "U*" when you use the UDF in a circuit program, for example: